package com.java.Enum;

/**
 * @Author: ZhangJin
 * @Date: 2020/9/19 22:26
 */
/* 前端房子的价位和面积不能同时 选取  只能任选其一 */
public enum PriceAccess {

    spacialSmall("Price特小型"),
    small("Price小型"),
    LowerMiddle("Price中等偏下"),
    Middle("Price中等"),
    UpperMiddle("Price中等偏上"),
    Big("Price大型"),
    Large("Price超大型"),
    Meeting("面议")
            ;
    private String Type;

    PriceAccess(String type){
        Type = type;
    }

    public String getType() {
        return Type;
    }

    public void setType(String type) {
        Type = type;
    }

    /* 月工资 -->  */
    public static PriceAccess getTypeBtPrice(Double Price){
        if (Price < 500 && Price != 0.0){
            return spacialSmall;
        }else if (Price >= 500 && Price < 2000){
            return  small;
        }else if (Price >= 2000 && Price < 4000){
            return LowerMiddle;
        }else if (Price >= 4000 && Price < 6000){
            return Middle;
        }else if (Price >= 6000 && Price < 10000){
            return UpperMiddle;
        }else if (Price >= 10000 && Price < 15000){
            return Big;
        }else if (Price >= 15000){
            return Large;
        }
        return  Meeting;

    }
}
